﻿{% extends "gma/base.html" %}
{% load mytag %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-search-location my-page-title-icon"> </i>
    </h1>
    <p class="page__desc">共找到{{ broadcasters|length }}个用户。</p>
</div>

<div class="page__bd">
    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__bd">
            {% for user in broadcasters %}
            <a href="{% url 'gma:caster_detail' user.id %}" class="weui-media-box weui-media-box_appmsg weui-cell_access">
                <div class="weui-media-box__hd">
                    <img class="weui-media-box__thumb avatar" src="{{ user.avatar|cdn }}" alt="">
                </div>
                <div class="weui-media-box__bd">
                    <h4 class="weui-media-box__title">{{ user.nickname }}</h4>
                    <p class="weui-media-box__desc">{{ user.create_time|date:"Y-m-d H:i:s" }}</p>
                    <p class="weui-media-box__desc">{{ user.bundle_id }}</p>
                </div>

                <div class="weui-cell__ft">
                    #{{ user.id }}
                </div>
            </a>
            {% endfor %}

            <div class="weui-media-box weui-media-box_text">
                <ul class="weui-media-box__info">
                    <li class="weui-media-box__info__meta"> 共搜索到 {{ total_count }} 名主播 </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{##}
{#<script type="text/javascript">#}
{#$(function() {#}
{#    var $searchBar = $('#searchBar'),#}
{#        $searchResult = $('#searchResult'),#}
{#        $searchText = $('#searchText'),#}
{#        $searchInput = $('#searchInput'),#}
{#        $searchClear = $('#searchClear'),#}
{#        $searchCancel = $('#searchCancel');#}
{##}
{#    function hideSearchResult(){#}
{#        $searchResult.hide();#}
{#        $searchInput.val('');#}
{#    }#}
{#    function cancelSearch(){#}
{#        hideSearchResult();#}
{#        $searchBar.removeClass('weui-search-bar_focusing');#}
{#        $searchText.show();#}
{#    }#}
{##}
{#    $searchText.on('click', function(){#}
{#        $searchBar.addClass('weui-search-bar_focusing');#}
{#        $searchInput.focus();#}
{#    });#}
{#    $searchInput#}
{#        .on('blur', function () {#}
{#            if(!this.value.length) cancelSearch();#}
{#        })#}
{#        .on('input', function(){#}
{#            if(this.value.length) {#}
{#                $searchResult.show();#}
{#            } else {#}
{#                $searchResult.hide();#}
{#            }#}
{#        })#}
{#    ;#}
{#    $searchClear.on('click', function(){#}
{#        hideSearchResult();#}
{#        $searchInput.focus();#}
{#    });#}
{#    $searchCancel.on('click', function(){#}
{#        cancelSearch();#}
{#        $searchInput.blur();#}
{#    });#}
{##}
{#    hideSearchResult();#}
{#});#}
{#</script>#}

{% endblock extra_js %}